import {HTTP} from '../util/http'

class LikeModel extends HTTP {
    like(like_or_cancel, art_id, type) {
        let url = like_or_cancel === 'cancel' ? 'like/cancel' : 'like'
        this.request({
          url: url,
          method: 'POST',
          data: {
            art_id: art_id,
            type: type
          },
          success: (data) => {
            console.log(data)
          }
        })
    }
    getClassicLikeStatus(art_id,category,callback){
      this.request({
        url: `classic/${category}/${art_id}/favor`,
        success:callback
      })
    }
}
export {LikeModel}
